package com.zlz.controller;

import com.zlz.entity.User;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:曾令忠
 * @Desc:
 * @Date 2020/8/15 0015 22:43
 */
@RestController
public class HelloController {
    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }
    @PostMapping("/hi")
    @ApiOperation("hello控制类")
    public String hi(@ApiParam("名字") String uname){
        return "hi"+uname;
    }

    @PostMapping("/user")
    @ApiOperation("用户测试类")
    public User user(@ApiParam("user用户") User user){
        return user;
    }
}
